<template>
	<view class="album-item-wrapper" @click="toExam">
		<image :src="baseUrl +'/imgs/dachang-bg.jpg'"></image>
		<text>{{item.name}}</text>
	</view>
</template>

<script>
	import {
		mapState
	} from "vuex"

	export default {
		name: "album-item",
		props: [
			"item"
		],

		data() {
			return {

			};
		},

		computed: mapState([
			"baseUrl"
		]),

		mounted() {
			console.log("album item=", this.item);
		},

		methods: {
			toExam(e) {
				uni.navigateTo({
					url: "/pages/exam/exam?aid=" + this.item.albumid
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.album-item-wrapper {
		position: relative;

		image {
			width: calc(100% - 0rpx);
			margin: 5rpx;
			border-radius: 20rpx;
		}

		text {
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);

			display: block;
			font-size: 1.6rem;
			font-style: italic;
			font-weight: bold;
			color: #000066;
			text-shadow: 5rpx 5rpx 5rpx #0006;
		}
	}
</style>